import { Controller } from '@nestjs/common';
import { Crud, CrudController, Override, ParsedRequest, ParsedBody, CrudRequest } from '@nestjsx/crud';
import { ApiTags} from '@nestjs/swagger';
import { Product } from '../../entities/product.entities';
import { ProductService } from '../../services/product/product.service';

@Crud({
  model:{
    type:Product,
  },
  query:{
    exclude:[],
    join:{
      goods:{
        exclude:["category_id","brand_id","keywords","is_on_sale","is_delete","attribute_category","is_new","app_exclusive_price","is_app_exclusive","is_limited","is_hot","create_user_id","update_user_id","create_user_dept_id","promotion_tag","add_time","update_time","counter_price","extra_price","unit_price"]
      }
    }
  }
})
@ApiTags('product')
@Controller('api/product')
export class ProductController {
  constructor(
    public service:ProductService
  ){}
}
